home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -websites- / whdload / games / violator.lha / ViolatorHD / Install next >
Text File  |  1999-07-03  |  3KB  |  158 lines

  1. ;****************************
  2.  
  3. (set #readme-file "Violator.readme") ;name of readme file
  4. (set #last-disk 1)          ;amount of disks
  5. (set #disk-size 901120)     ;size of each disk
  6.  
  7. (procedure P_chkrun
  8.   (if
  9.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  10.     ("")
  11.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  12.   )
  13. )
  14.  
  15. (procedure P_image
  16.   (message ("\nInsert \"%s\" into drive %s !\n\n(make sure it's the right disk because it will not checked)" #CI_diskname #CI_drive))
  17.   (if
  18.     (= 0 
  19.       (run ("cd \"%s\"\nDIC %s FD=%ld LD=%ld SIZE=%ld >CON:///1000//CLOSE" #dest #CI_drive #CI_diskno #CI_diskno #disk-size))
  20.     )
  21.     ("")
  22.     (abort "\"DIC\" has failed to create a diskimage")
  23.   )
  24. )
  25.  
  26. (if
  27.   (exists #readme-file)
  28.   (if
  29.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  30.     ("")
  31.     (run ("SYS:Utilities/More %s" #readme-file))
  32.   )
  33. )
  34.  
  35. (set #program "WHDLoad")
  36. (P_chkrun)
  37.  
  38. (set #program "DIC")
  39. (P_chkrun)
  40.  
  41. ; in expert mode ask for source drive
  42. (if
  43.   (= @user-level 2)
  44.   (
  45.     (set #CI_drive
  46.       (askchoice
  47.     (prompt "Select source drive for diskimages")
  48.     (default 0)
  49.     (choices "DF0:" "DF1:" "RAD:" "Enter Device")
  50.     (help @askchoice-help)
  51.       )
  52.     )
  53.     (select #CI_drive
  54.       (set #CI_drive "DF0:")
  55.       (set #CI_drive "DF1:")
  56.       (set #CI_drive "RAD:")
  57.       (set #CI_drive
  58.         (askstring
  59.           (prompt "Select source drive for diskimages")
  60.           (default "DF0:")
  61.           (help @askstring-help)
  62.         )
  63.       )
  64.     )
  65.   )
  66.   (set #CI_drive "DF0:")
  67. )
  68.  
  69. (set @default-dest
  70.   (askdir
  71.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  72.     (help @askdir-help)
  73.     (default @default-dest)
  74.     (disk)
  75.   )
  76. )
  77. (set #dest (tackon @default-dest @app-name))
  78. (if
  79.   (exists #dest)
  80.   (
  81.     (set #choice
  82.       (askbool
  83.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  84.         (default 1)
  85.         (choices "Delete" "Skip")
  86.         (help @askbool-help)
  87.       )
  88.     )
  89.     (if
  90.       (= #choice 1)
  91.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  92.     )
  93.   )
  94. )
  95. (makedir #dest
  96.   (help @makedir-help)
  97.   (infos)
  98. )
  99.  
  100. (copyfiles
  101.   (help @copyfiles-help)
  102.   (source ("%s.slave" @app-name))
  103.   (dest #dest)
  104. )
  105. (if
  106.   (exists ("%s.newicon" @app-name))
  107.   (set #icon
  108.     (askchoice
  109.       (prompt "\nWhich icon do you like to install ?\n")
  110.       (default 0)
  111.       (choices "Normal" "NewIcon")
  112.       (help @askchoice-help)
  113.     )
  114.   )
  115.   (set #icon 0)
  116. )
  117. (select #icon
  118.   (set #icon ("%s.inf" @app-name))
  119.   (set #icon ("%s.newicon" @app-name))
  120. )
  121. (copyfiles
  122.   (help @copyfiles-help)
  123.   (source #icon)
  124.   (newname ("%s.info" @app-name))
  125.   (dest #dest)
  126. )
  127. (if
  128.   (exists #readme-file)
  129.   (copyfiles
  130.     (help @copyfiles-help)
  131.     (source #readme-file)
  132.     (dest #dest)
  133.     (infos)
  134.   )
  135. )
  136.  
  137. (if
  138.   (exists ("%s.info" #readme-file))
  139.   (copyfiles
  140.     (help @copyfiles-help)
  141.     (source ("%s.info" #readme-file))
  142.     (dest #dest)
  143.   )
  144. )
  145.  
  146. (set #CI_diskno 1)
  147. (while
  148.   (<= #CI_diskno #last-disk)
  149.   (
  150.     (set #CI_diskname ("%s Disk %ld" @app-name #CI_diskno))
  151.     (P_image)
  152.     (run ("FileNote Disk.%ld %s Quiet" #CI_diskno @app-name))
  153.     (set #CI_diskno (+ #CI_diskno 1))
  154.   )
  155. )
  156.  
  157. (exit)
  158.